# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-xlrd
_pkgname=xlrd
pkgver=1.2.0
pkgrel=3
pkgdesc='Library for developers to extract data from Microsoft Excel (tm) spreadsheet files.'
arch=('any')
url="http://www.python-excel.org/"
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('eea14845701b86a2679f140c9730e8ee2722b4f859cdd870f86bf54df522d54fc3c78dc4354aeb958c72596a6349995e9d79935efc734de096f6e007945fc1b3')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/runxlrd.py" "$pkgdir/usr/bin/runxlrd2.py"
}

